#include"MyTask.h"
#include"MyTask1.h"
#include"TaskQenen.h"
#include"Thread.h"
#include<functional>
using std::bind;

//---//
int test(){
    TaskQenen que(10);
    MyTask task(que);
    MyTask1 task1(que);

    
    //生产者
    Thread t1(std::bind(&MyTask1::process, &task1));
    //消费者
    Thread t(std::bind(&MyTask::process,&task));



    t1.start();
    t.start();
   

    t.stop();
    t1.stop();
}
int main(void){
    test();
}